﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Logic
{
    public class ViewConfiguration
    {
        public String Tasks_Index_Layout { get; set; }
        public String Tasks_Create_Layout { get; set; }
        public ContainerTypes ContainerType { get; set; }
        public String BaseUrl { get; set; }
        public Boolean ShowGoogleDocs { get; set; }
        public Boolean ShowAddintionalInformation { get; set; }
        public Boolean WideTasksView { get; set; }
        public Boolean ShowCustom { get; set; }
        public String View { get; set; }
        public Boolean IsGmail { get { return Constants.IsGmail && !Constants.IsGmailCanvas; } }

        public static ViewConfiguration GetViewConfig()
        {
            if(!Constants.IsGmail || true)
                return new ViewConfiguration 
                { 
                    Tasks_Index_Layout="/Views/Shared/layout.cshtml",
                    Tasks_Create_Layout = "/Views/Shared/CreateLayout.cshtml",
                    ContainerType = ContainerTypes.Conduit,
                    BaseUrl = Constants.CurrentUrl,
                    ShowGoogleDocs = false,
                    ShowAddintionalInformation = true,
                    WideTasksView = true,
                    View = "index_C",
                    ShowCustom = true,
                };
            else
                return new ViewConfiguration 
                { 
                    ContainerType = ContainerTypes.Gmail,
                    Tasks_Create_Layout = "/Views/Shared/CreateLayout.cshtml",
                    BaseUrl = Constants.CurrentUrl,
                    ShowGoogleDocs = true,
                    ShowAddintionalInformation = true,
                    WideTasksView = false,
                    View =  Constants.IsGmailCanvas? "index_C": "index"
                };
            
        }

        
    }

    public enum ContainerTypes
    {
        Gmail,
        Conduit
    }
}
